# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Leo <thinkabit.ukim@gmail.com>
pkgname=glow
pkgver=0.2.0
pkgrel=1
pkgdesc="CLI Markdown render"
url="https://github.com/charmbracelet/glow"
options="!check chmod-clean"
arch="all"
license="MIT"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/charmbracelet/glow/archive/v$pkgver.tar.gz"
builddir="$srcdir/src/github.com/glow"

prepare() {
	mkdir -p ${builddir%/*}
	mv "$srcdir"/$pkgname-$pkgver "$builddir"/
	default_prepare
}

build() {
	export GOPATH="$srcdir"
	go build -v -o glow -ldflags "-X main.Version=$pkgver -s -w"
}

package() {
	install -Dm755 glow "$pkgdir"/usr/bin/glow
}

sha512sums="792b68c221abe9954be65bfbc08b8ab830ee237da94676563e10feb4ddc8fd46544c4e7abad60d4e6e8180d9d8e7dcb816ca29a1e6d84feab215f6c23644010a  glow-0.2.0.tar.gz"
